package com.yonyougov.cruxtestcase.testcase.baiscdata.enumvalue.multiversion;

import com.yonyougov.cruxtestcase.basecase.BaseCase;
import com.yonyougov.cruxtestcase.dto.BaseResponseDto;
import com.yonyougov.cruxtestcase.dto.BaseTestReqDto;
import com.yonyougov.cruxtestcase.testcase.baiscdata.enumvalue.multiversion.dto.EnumValueHistoryDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@RestController
@RequestMapping("/api/enumvalue/multversion/historyquery")
@Valid
public class EnumValueQueryHistoryController implements BaseCase {

    @Autowired
    private EnumValueCaseService enumValueCaseService;

    @Override
    public String getName() {
        return "码值查询历史数据";
    }

    @Override
    public String getRemark() {
        return "码值多版本查询所有历史版本数据测试用例";
    }

    @Override
    public BaseResponseDto testcase(BaseTestReqDto baseDto) {
        return null;
    }

    @PostMapping("/testcase")
    public BaseResponseDto testcase(@RequestBody EnumValueHistoryDto dto){
        return enumValueCaseService.queryHistoryTestcase(dto);
    }
}
